
package com.apes.scm.masterdata.car.model;

import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.Model;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;


/**
 * 功能：汽车排放标准
 *
 * @Auther: linwz
 * @Date: 2018/7/23 13:47
 */

@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = EmissionStandard.CONST_TABLE_NAME)
public class EmissionStandard extends Model {

    public static final String CONST_TABLE_NAME = "mas_car_emission_standard";

    @Id
    @Column(name = "id", length = 60)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "排放标准")
    @Comment("排放标准编码")
    private String id;//排放标准编码

    @Column(name = "name",length = 120, nullable = false)
    @Comment("名称")
    private String name;//排放标准名称
}

